package cn.bincker.mycaptcha.slider.entity;

import cn.bincker.mycaptcha.basic.entity.MyAnswer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 前端提交的答案
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SliderAnswer implements MyAnswer, Cloneable {
    private Integer x;

    @Override
    public SliderAnswer clone() {
        try {
            var clone = (SliderAnswer) super.clone();
            clone.x = x;
            return clone;
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}
